home *** CD-ROM | disk | FTP | other *** search
-
-
- FGREP UNIX like Utilities for MS-DOS 2.0 Page- 1
-
-
-
-
- FGREP ---
-
-
- The FGREP utility searches files for particular text patterns.
- Each line on which the pattern is found is displayed. The text
- patterns cannot contain blanks or any wild-cards. The syntax is:
-
-
- FGREP <options> <pattern> <files or directories>
-
-
- The values for <options> are as follows:
-
- -r recursively search sub-directories of directories
- specified in the list <files or directories>. The
- default is to search only files in the <files or
- directories> list and files in directories in that
- list.
-
- -i ignore upper/lower case when matching the <pattern>.
-
- -l also print line numbers for matching text in files.
-
- -n only print file names of files with matching text.
-
- -v reverse the test--print all lines except those with a
- matching text pattern.
-
- -c only print a count of how many lines contain matching
- text.
-
- -^ Treat the character ^ in the pattern string as a blank.
- Normally, the pattern cannot contain a blank because
- command line arguments are separated by blanks. The -^
- option is provided so that a blank can effectively be
- specified in the pattern. For example,
-
- fgrep -^ a^string *.pas
-
- searches all files ending in .pas for the string "a
- string". Without the -^ option, the string "a^string"
- would be searched for.
-
- The <pattern> parameter is the text string to search for. This
- string is specified exactly as you want it to appear in the
- files' lines (that is, it is not surrounded by quotes). The
- pattern may contain no blanks, and cannot start with a '-' (which
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FGREP UNIX like Utilities for MS-DOS 2.0 Page- 2
-
-
-
-
- is used to specify options).
-
- The <files or directories> parameter is identical to SEARCH, see
- above. If no files are given, then FGREP accepts keyboard input
- (or redirected input) to search.
-
- Examples:
-
- FGREP -i proc c:/sources d:/project/*.asm
- will (ignoring upper/lower case) print a list of files and
- their lines which contain the string 'proc', files in the
- directory c:/sources, and files with an .ASM extension in the
- d:/project directory will be searched.
-
- FGREP -ri proc c:/sources d:/project/*.asm
- will act as the above example, except that any sub-
- directories of c:/sources (and their sub-directories) will also
- participate in the string search.
-
-